<!DOCTYPE html>
<html lang="en">
<head>
    <tp-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jQuery元素宽高</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            border: 1px solid black;
            background: #e5e55e;
        }
    </style>
</head>
<body>
    <!-- 点击按钮正方形宽高翻倍 -->
    <div></div>
    <button>改变正方形</button>
</body>
<script src="../js/jquery.js"></script>
<script>
    $("button").click(function(){
        // 获取div元素
        let w = $("div").width ()
        // console.log($("div").width());
        $("div").width (2*w)
        
        let h = $("div").height ()
        $("div").height (2*h)
    })
    
   
</script>
</html>